home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 19 / MacAddict_019_1998_03.iso / Media / Software.dxr / LingoLib_13_v12 DB search stuff.ls < prev    next >
Encoding:
Text File  |  1997-12-18  |  2.4 KB  |  75 lines

  1. on showSelection
  2.   global gTB
  3.   set n to mSelectCount(gTB)
  4.   put n into field "totalCount"
  5.   set temp to mGetPosition(gTB)
  6.   mGoFirst(gTB)
  7.   put EMPTY into field "zlist"
  8.   set dummy to EMPTY
  9.   repeat with i = 1 to n
  10.     set nm to mGetField(gTB, "name")
  11.     put nm & RETURN after dummy
  12.     mGoNext(gTB)
  13.   end repeat
  14.   put dummy into field "zlist"
  15.   mGo(gTB, temp)
  16.   updateDisplay()
  17. end
  18.  
  19. on updateDisplay
  20.   global gTB
  21.   set i to mGetPosition(gTB)
  22.   set the foreColor of field "zlist" to 0
  23.   set the foreColor of line i of field "zlist" to 235
  24.   put mGetField(gTB, "section") into field "section"
  25.   put mGetField(gTB, "category") into field "category"
  26.   put mGetField(gTB, "name") into field "name"
  27.   put mGetField(gTB, "filepath") into field "filepath"
  28.   put mGetField(gTB, "auth/comp") into field "auth/comp"
  29.   put mGetField(gTB, "url") into field "url"
  30.   put mGetField(gTB, "version") into field "version"
  31.   put mGetField(gTB, "description") into field "description"
  32.   put mGetField(gTB, "contact") into field "contact"
  33. end
  34.  
  35. on nextRecord
  36.   global gTB, imagesprite, gpointer
  37.   set errCode to mGoNext(gTB)
  38.   put mGetField(gTB, "section") into field "section"
  39.   put mGetField(gTB, "category") into field "category"
  40.   put mGetField(gTB, "name") into field "name"
  41.   put mGetField(gTB, "filepath") into field "filepath"
  42.   put mGetField(gTB, "auth/comp") into field "auth/comp"
  43.   put mGetField(gTB, "url") into field "url"
  44.   put mGetField(gTB, "version") into field "version"
  45.   put mGetField(gTB, "description") into field "description"
  46.   put mGetField(gTB, "contact") into field "contact"
  47. end
  48.  
  49. on prevRecord
  50.   global gTB, imagesprite, gpointer
  51.   set errCode to mGoPrevious(gTB)
  52.   put mGetField(gTB, "section") into field "section"
  53.   put mGetField(gTB, "category") into field "category"
  54.   put mGetField(gTB, "name") into field "name"
  55.   put mGetField(gTB, "filepath") into field "filepath"
  56.   put mGetField(gTB, "auth/comp") into field "auth/comp"
  57.   put mGetField(gTB, "url") into field "url"
  58.   put mGetField(gTB, "version") into field "version"
  59.   put mGetField(gTB, "description") into field "description"
  60.   put mGetField(gTB, "contact") into field "contact"
  61. end
  62.  
  63. on getDBPos
  64.   global gTB, gpointer, dbPos
  65.   set i to the text of member "totalCount"
  66.   set dbPos to mGetPosition(gTB)
  67.   if dbPos = i then
  68.     set count to count + 1
  69.     if count >= 2 then
  70.       mGoFirst(gTB)
  71.       set count to 0
  72.     end if
  73.   end if
  74. end
  75.